[LINUX] Update the hvm_op wrapper now that the return value of get_param is in
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 16 Aug 2006 15:15:46 +0000 (16:15 +0100)
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>
Wed, 16 Aug 2006 15:15:46 +0000 (16:15 +0100)
the parameter structure rather than the hypercall return value.
Signed-off-by: Steven Smith <ssmith@xensource.com>
linux-2.6-xen-sparse/include/xen/hvm.h

index 25987ffee56257c0758163dae9bb9e90ba5fbda7..97bb68a32920be0eab6b6139252309048b7bcd36 100644 (file)
@@ -8,10 +8,17 @@
 static inline unsigned long hvm_get_parameter(int idx)
 {
        struct xen_hvm_param xhv;
+       int r;
 
        xhv.domid = DOMID_SELF;
        xhv.index = idx;
-       return HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
+       r = HYPERVISOR_hvm_op(HVMOP_get_param, &xhv);
+       if (r < 0) {
+               printk(KERN_ERR "cannot get hvm parameter %d: %d.\n",
+                      idx, r);
+               return 0;
+       }
+       return xhv.value;
 }
 
 #endif /* XEN_HVM_H__ */